<template>
	<!-- 用户信息 -->
	<div class="stu">
		<div v-if="list" style="width:100%;padding-bottom:20px;" :style="{borderBottom:boder?'1px solid #D0D0D0':'none'}">
		   <div class="tabs" v-for="(value, key, index) in list" v-if="value&&key_cn(val[num],key)||(value===0&&key_cn(val[num],key)?true:false)">
			 <p>{{key_cn(val[num],key)}} :</p><div>{{bod(key,value)}}</div>
		   </div>
		</div>
		<p v-show="!list" style="text-align: center;line-height:100px;color:#D1DBE5;">暂无数据</p>
	</div>
</template>
<script>
	import $ from 'jquery'
	export default {
		name: 'stu',
		components: {}, //声明子组件
		computed: {
			bod(){
				return (key,value)=>{
					if(key=='sex'){
						return value==0?'女':(value==1?'男':value);
					}else if(key=='work_id'){
						return this.val_lab(this.$store.state.activebox,value)
					}else if(key=='is_stay_county'){
						return value==1?'愿意':'不愿意'
					}else if(key=='pos_id'){
						return value==1?'在职':'离职'
					}else if(key=='position_status'){
						let a = ['在岗','离职','退休','其他'];
						for(let i in a){
							if(value==(i+1)){
								return a[i]
							}
						}
					}else if(key=='is_rent_field'){
						return value==1?'是':'否'
					}else if(key=='farm_id'){
						return value==1?'种植':'养殖'
					}else if(key=='marray_id'){
						let a = ['未婚','已婚','离婚','事实离婚','丧偶'];
						for(let i in a){
							if(value==(i+1)){
								return a[i];
							}
						}
					}else if(key=='jq_id'){
						let a = ['嫁','娶','入赘','其他'];
						for(let i in a){
							if(value==(i+1)){
								return a[i];
							}
						}
					}else if(key=='jq_obj_id'){
						let a = ['本村','本乡','隔壁','县内','省内'];
						for(let i in a){
							if(value==(i+1)){
								return a[i];
							}
						}
					}else if(key=='list_type'){
						return value==1?'道德红黑榜':'卫生红黑榜'
					}else if(key=='deal_type'){
						return value==1?'奖励':'处罚'
					}else if(key=='canbao_type'){
						return value==50000?'社保':'医保'
					}else if(key=='is_normal'){
						return value==0?'未参保':(value==4?'终止参保':'正常参保')
					}else if(key=='money_status'){
						return value==1?'缴费':'未缴费'
					}else if(key=='is_stay'){
						return value==1?'在':'否'
					}else if(key=='is_pay'){
						return value==1?'是':'否'
					}else if(key=='status'){
						return value==1?'待审核':'已兑换'
					}else if(key=='cadre_id'){
						let a = ['乡干部','村干部','组干部'];
						for(let i in a){
							if(value==(i+1)){
								return a[i];
							}
						}
					}else if(key=='position_id'){
						let a = ['行政','事业','聘用'];
						for(let i in a){
							if(value==(i+1)){
								return a[i];
							}
						}
					}else if(key=='politic_id'){
						return this.val_lab(this.$store.state.politic_box,value)
					}else if(key=='pos_id'){
						return this.val_lab(this.$store.state.pos_id,value)
					}else if(key=='is_local'){
						return value==1?'是':'否'
					}else if(key=='edu_id'){
						let a = ['文盲或半文盲','小学','初中','高中','技工学校','中专和中技','大专','本科','硕士','博士'];
						for(let i in a){
							if(value==(i+1)){
								return a[i];
							}
						}
					}else if(key=='is_float'){
						return value==1?'是':'否'
					}else if(key=='is_town_area'){
						return value==1?'是':'否'
					}else if(key=='house_struct_id'){
						return this.val_lab(this.$store.state.house_struct_box,value)
					}else if(key=='house_cate_id'){
						return this.val_lab(this.$store.state.house_cate_box,value)
					}else if(key=='house_jz_id'){
						return this.val_lab(this.$store.state.house_jz_box,value)
					}else if(key=='house_safe_id'){
						return this.val_lab(this.$store.state.house_safe_box,value)
					}else if(key=='is_toilet'){
						return value==1?'是':'否'
					}else if(key=='party_build_id'){
						return this.id_title(this.$store.state.tpzc_id,value)
					}else if(key=='is_treatment'){
						return value==1?'是':'否'
					}else if(key=='nation_id'){
						return this.val_lab(this.$store.state.mingzu_box,value)
					}else if(key=='health_id'){
						return this.val_lab(this.$store.state.HEALTH_S_T,value)
					}else if(key=='pover_p_id'){
						return this.val_lab(this.$store.state.POVER_S_T,value)
					}else if(key=='is_out'){
						return value==1?'是':'否'
					}else if(key=='poor_rid_id'){
						return this.id_title(this.$store.state.tpzc_id,value)
					}else{
						return value
					}
					
				}
			},
			
		},
		data() {
			return {
				val:[
				   {//用户信息 0
					name:'姓名',
					number: "人编号",
					card:"身份证号码",
					sex:"性别",
					phone:"联系电话",
					address_id_text:"常住地类别" ,
					nation_id_text:"民族" ,
					politic_id_text:"政治面貌" ,
					house_id_text:"户籍类别" ,
					edu_id_text:"文化程度",
					pover_id_text:"劳动技能",
					role_id_text:"角色",
					pop_status_text:"人口状态",
					house_relation:"户籍关系",
					death_reson:"死忙原因",
					birth_day:"出生日期",
					address_lon:"住址经度",
					address_lat:"住址纬度",
					farmland_area:"耕地面积",//  (单一数值)
					forest_area:"山林面积",//   (单一数值)
				  },
				  {//家庭信息 1
					family_number:"户编号",
					house_hold_card:"户主身份证号码",
					village_name:"行政村名",
					group_name:"村组名",
				  },
				  {//健康信息 2
				  	health_id_text:"健康",
				  	condition_desc:"病情说明",
				  	medicare_reimburse:"医保报销",
				  },
				  
				  {//贫困户信息 3
				  	name:"户主名",
				  	// family_id:"家庭",
				  	pover_p_id:"贫困户类型",
				  	major_pover:"主要致贫原因",
				  	year:"务工时间（月）",
				  	pover_text:"脱贫属性",
				  	poor_rid_id:"脱贫政策",
				  	t_poor_time:"脱贫年度",
				  	poor_time:"识别时间",
				  	village_name:"行政村名",
				  	group_name:"村组名",
				  	h_number:"户编号",
				  },
				  
				  {//贫困人口信息 4
				  	  pop_name:"姓名",
				  	  card:"身份证号码",
				  	  // pover_p_id:"贫困户类型",
				  	  major_pover:"主要致贫原因",
				  	  is_treatment:"是否参加大病医疗",
				  	  house_relation:"户籍关系",
				  	  year:"务工时间（月）",
				  	  p_number:"人编号",
				  	  nation_id:"民族",
				  	  h_number:"户编号",
				  },
				  
				  {//贫困户流水表 5
				  	name:"姓名",
				  	account:"账号",
				  	card:"身份证号码",
				  	deal_date:"交易日期",
				  	deal_money:"交易金额",
				  	account_money:"账户余额",
				  	comment:"备注",
				  },
				  {//非贫困户的资金信息 6
				  	type:"资金发放类型",
				  	issue_account:"流水账号",
				  	issue_real_total:"发放金额",
				  	release_time:"发放时间",
				  	remark:"备注",
				  },
				   
				  {//教育信息 education_info 7
				  	// edu_id:"文化程度",//ID
					edu_id_text:"文化程度",
				  	year:"年度",
				  	school:"学校",
				  	grade:"年级",
				  	school_lon:"学校经度",
				  	school_lat:"学校纬度",
				  	study_area:"读书区域",
				  	raise_id:"抚养情况",
				  },
				  
				  {//教育保障信息 education_insurance 8
				  	// family_id：家庭ID
				  	card:"身份证号码",
				  	student_name:"学生姓名",
				  	school_name:"学校名称",
				  	student_grade:"年级",
				  	all_fee:"金额",
				  	one_card:"一卡通账号",
				  	comment:"发放说明",
				  },
				  {//医疗保障信息 medical_insurance 9
				  	user_name:"姓名",
				  	card:"身份证号码",
				  	// family_id:"家庭id",
				  	medical_type:"医疗类型",
				  	hospital:"医院名称",
				  	all_pay_fee:"总费用",
				  	persoan_pay_fe:"个人自付",
				  	bx_bl:"报销比例",
				  	current_date:"报销时间",
				  },
				  
				  {//务工信息 work_info 10
				  	// pop_id:人口ID
				  	work_id:"务工状况",//ID
				  	work_address:"务工地址",//
				  	work_lon:"经度",//
				  	work_lat:"纬度",//
				  	unit_id:"单位",//ID
				  	unit_name:"单位名称",//
				  	work_type:"工种",//
				  	work_wage:"工资",//
				  	work_year:"务工年度",//
				  	is_out:"是否外出",//
				  	out_time:"外出时间",//
				  	is_stay_county: "是否有意留在县内",//  1 愿意 0 不愿意
				  	pos_id:"岗位状态",// 1在职 0 离职
				  },
				  
				  {// 务工经历信息 work_experience_info 11
					  // pop_id:人口ID
					  unit_name:"单位名称",//
					  work_start_time:"工作时间",//
					  work_end_time:"工作结束时间",// (out_time 选一个)
					  position_status:'岗位状态',// 1在岗 2离职 3退休 4其他
					  remark:"备注",//
					  work_wage:"工资",//
					  out_time:"离职时间",//
				  },
				  
				  {// 务农信息  farm_info 12
					 pop_name:"姓名",//
					 // pop_id：人口ID
					 farm_id:"农业类型",//ID
					 content:"内容",
					 amount:"数量",
					 is_rent_field : "是否租田",//  1 是  0 否
					 farm_address: "务农地址",//
					 farm_lon:"务农经度",//
					 farm_lat:"务农纬度",//
				  },
				  
				  {//婚姻信息  marriage_info 13
					 // pop_id:人口ID
					 marray_id:"婚姻状况",//ID
					 jq_id:"嫁娶类型",//ID,//
					 spouse_pop_id:"配偶",//ID
					 spouse_card:"配偶身份证号码",//
					 marray_time:"结婚时间",//
					 jq_obj_id:"嫁娶对象区域",//ID
					 jq_obj_address:"嫁娶对象地址",//
				  },
				  
				  {//红黑榜信息 red_black_info 14
					publish_name:"发布人",//
					// pop_id:人口ID
					list_type:"红黑榜类型",// 道德红黑榜1   卫生红黑榜2
					type:"红黑榜",// 1 红  2黑
					title:"标题",//
					erd_text:"内容",//
					// content:内容
					deal_type:"奖罚类型",// 1奖励  2处罚  0代表没这项
					point:"奖励扣除积分数",//
					img:"图片",//
					browse_num:"浏览量" ,//
				  },
				  
				  {//参保信息 canbao_info 15
					 canbao_type:"参保类型",// 50000社保 10000 医保
					 area:"不必展示",//
					 card:"身份证号码",//
					 user_name:"姓名",//
					 age:"年龄",//
					 canbao_money:"参保金额",//
					 canbao_time:"参保时间",//
					 is_normal:"是否正常参保",//  0未参保  4终止参保   1正常参保
					 money_status:"是否缴费",// 1 缴费   0未缴费
					 comment:"备注",//
				  },
				  
				  {// point_info 16
					my_point:"当前积分",
					total_point:"累计积分",
					exchange_point:"兑换积分",
				  },
				  
				  {//environment_fee_info 17
					 village_name:"行政村名",//
					 group_name:"村小组名",//
					 name:"姓名",//
					 is_stay:"是否在家",//  1 在  0否
					 card:"身份证号码",//
					 is_pay:"是否缴费" ,// 1 是  0 否
					 pay_ment:"卫生费金额",//
					 pay_time:"缴费时间" ,// (日期)
					 // family_id：家庭ID
				  },
				  
				  {//family_point_info 18
					 // family_id：家庭ID
					 indoor_hygiene_score:"屋内得分",
					 outdoor_hygiene_score:"屋外得分",
					 current_envir_score:"当前得分",
					 assort:"工作配合度",
				  },
				  
				  {//exchange_goods_info 19
					 // pop_id：人口ID
					 time:"时间",//
					 status:"兑换状态",// 待审核 1  已兑换2
					 name:"姓名",//
					 manage_name:"审核员",//
					 house_number:"门牌号",//
					 goods_name:"商品名",//
					 goods_pic:"商品图片",//
					 goods_desc:"商品描述",//
					 point_price:"兑换价格",//
				  },
				  
				  {//cadre_info 20
					 name:"姓名",//
					 card:"身份证号码",//
					 unit:"单位",//
					 position:"职务",//
					 // cadre_id:"干部类别",//
					 cadre_id_text: "干部类别",
					 // position_id:"职位属性",//
					 position_id_text:"职位属性",//
					 one_card:"一卡通",//
					 phone:"联系电话",//
					 short_phone:"短号",//
					 politic_id:"政治面貌",//ID
					 // politic_id_text:
					 work_start_time:"工作开始时间",//
					 pos_id:"岗位状态",//ID
					 // pos_id_text:
					 work_end_time:"工作结束时间",//
					 is_local:"是否本地居民",// 1 是本地居民  0 否
					 logo:"头像照片",//
					 tel:"座机",//
					 jobs:"负责工作",//
					 is_charge:"是否站所负责人",// ""
				  },
				  
				  {//party_member_info 21
					 name:"姓名",//
					 card:"身份证号码",//
					 // edu_id:"文化程度",//
					 edu_id_text:"文化程度",
					 politic_id:"政治面貌",//ID,//
					 // politic_id_text
					 party_time:"入党时间",//
					 phone:"联系电话",//
					 party_unit:"所属支部",//
					 logo:"头像照片",//
					 lon:"经度",//
					 lat:"纬度",//
					 is_float:"是否流动党员",//
				  },
				  
				  {//house_info 22
					 // pop_id:人口ID
					 address:"地址",//
					 address_lon:"经度",//
					 address_lat:"纬度",//
					 is_town_area:"是否在城镇范围",//
					 // house_struct_id:"房屋结构",//ID
					 house_struct_id_text:"房屋结构",//
					 house_area:"房屋面积",//
					 house_cate_id:"房屋类别",//ID
					 // house_cate_id_text:文案
					 owner_card:"产权所属人身份号码",//
					 owner_name:"产权所属人",//
					 house_jz_id:"房屋居住情况",//ID
					 // housue_jz_id_text:文案
					 house_safe_id:"房屋安全等级",//ID
					 // house_safe_id_text:文案
					 // buy_time:购买时间 (不要)
					 is_toilet: "是否有卫生厕",//  1 有 0 没有
					 house_number:"门牌号",//
					 toilet_condition:"卫生条件情况",//
					 first_area:"行政村名",//
					 second_area:"村小组名",//
					 // is_area:不用)
					 is_lease:"是否租借",//
					 lease_name:"租借人",//
					 lease_card:"租借身份证号码",//
				  },
				  
				  {//house_insurance_info 23
					  party_build_id:"脱贫攻坚政策",//ID
					  party_build_title:"标题",//
					  img:"图片",//
					  address:"地址",//
					  house_struct_text:"房屋结构文案",//
					  house_area:"面积",//
					  family_id:"家庭",//ID
					  fee:"费用",//
				  }
				  
				]
				
			}
		},
		props:{
			list:Object,
			num:Number,
			boder:Boolean,
		},
		methods: {
			
		},
		mounted() {
			console.log(this.list,'用户信息')
		}
	}
</script>
<style scoped="scoped">
	.stu{
		/* border-bottom:1px solid #D0D0D0; */
		padding-bottom:20px;
	}
	.tabs{
		width:100%;
		height:35px;
		margin-top:10px;
		line-height: 35px;
		font-size:15px;
	}
	.tabs p{
		width:150px;
		height:100%;
		text-align: right;
		float:left;
		margin-right:15px;
		font-weight: bold;
	}
	.tabs div{
		float:left;
		text-align:left;
	}
</style>
